import React from 'react';
import { Pagination } from 'antd';
import Pts from 'prop-types';

const Mypagniation = (props) => {
    //切换页码触发
    let onChange = (page) => {
        props.setPage(page)
    }
    return (
        <div>
             <Pagination current={props.page} total={props.total} onChange={(page, pageSize) => onChange(page, pageSize)} />
        </div>
    );
}
Mypagniation.defaultProps = {
    page: 1
}
Mypagniation.propTypes = {
    page: Pts.number.isRequired,
    total: Pts.number.isRequired
}

export default Mypagniation;
